<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

class HT_Model_administrator_models_appcat extends Zend_Db_Table {

   protected $_db;
   
    public function __construct() {
        $this->_name = "application_cate";
        $this->_db = Zend_Registry::get('dbMain');
        parent::init();
    }
    public function getAll(){
        $select  = $this->_db->select()->from($this->_name, array('key' => 'id','value' => 'cate_name'));

       $result = $this->getAdapter()->fetchAll($select);
       return $result;
    }
    public function findById($id){
        $sql = "select * from application_cate where id = $id";
        $retval = $this->_db->fetchRow($sql);
        return $retval;
    }
    

}

?>
